package com.tjetc.自定义序列化;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class T02反序列化 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream("user.txt"));
        User user= (User)objectInputStream.readObject();
        System.out.println(user);
        objectInputStream.close();
    }
}
